package com.jiaozi.system.pojo.vo.sys.user;

import com.jiaozi.base.enums.sys.StateEnum;
import com.jiaozi.base.enums.sys.YesOrNoEnum;
import com.jiaozi.base.enums.sys.bean.TagEnumBean;
import com.jiaozi.core.table.annotation.Column;
import com.jiaozi.core.table.enums.ColumnTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Schema(name = "用户列表")
@Data
public class UserPageVO {
    //主键
    @Schema(description = "主键")
    private String id;
    //用户账号
    @Schema(description = "用户账号")
    @Column(label = "用户账号",order = 1)
    private String userName;

    //用户昵称
    @Schema(description = "用户昵称")
    @Column(label = "用户昵称",order = 2)
    private String nickName;
    //部门id
    @Schema(description = "部门id")
    private String departmentId;
    @Schema(description = "部门名称")
    @Column(label = "角色名称",order = 3)
    private String departmentName;

    //手机号
    @Schema(description = "手机号")
    @Column(label = "手机号",order = 4)
    private String phone;
    //用户邮箱
    @Schema(description = "用户邮箱")
    @Column(label = "用户邮箱",order =5)
    private String email;
    //是否启用（0停用 1启用）
    @Schema(description = "是否启用")
    private StateEnum isEnabled;
    //过期时间
    @Schema(description = "有效期")
    @Column(label = "有效期",order = 6)
    private Date expiredDate;

    //最后登录时间
    @Schema(description = "最后登录时间")
    @Column(label = "最后登录时间",order = 7)
    private Date loginDate;
    //最后登录时间
    @Schema(description = "创建时间")
    @Column(label = "创建时间",order = 8)
    private Date createdTime;

    @Schema(description = "是否启用展示数据")
    @Column(label = "状态",order =5,type = ColumnTypeEnum.enu)
    private TagEnumBean isEnabledTagEnumBean;
    @Schema(description = "在线状态")
    @Column(label = "在线状态",order =5,type = ColumnTypeEnum.diy)
    private YesOrNoEnum onLine;


    public TagEnumBean getIsEnabledTagEnumBean() {
        return isEnabled.getTagBean();
    }

}
